import {transferCard} from './index'
import './index.less'

/**
 * 只做卡牌展示，主界面控制展示正面/背面
 * @param props props.card 然后把 card拿出来
 * @returns 
 */
const CardItem = (props: any) => {
  const {
    card = {
      num: 0,
      flower: '',
    }
  } = props

  return <div className={`card card-face-${card.flower}`}>
    <span className='card-number'>{transferCard(card).numString}</span>
    <span className='card-number-reverse'>{transferCard(card).numString}</span>
  </div>
}

export default CardItem